package sicnu.cs.ich.api.domain.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import sicnu.cs.ich.api.common.annotations.transaction.EncryptTransaction;
import sicnu.cs.ich.api.common.annotations.transaction.SensitiveData;


import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * @author 沈洋 邮箱:1845973183@qq.com
 * @create 2021/10/24-18:35
 **/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@SensitiveData
@TableName("t_user_info")
public class UserInfo implements Serializable {
    @TableId("user_id")
    private Integer userId;
    @NotBlank
    private String nickname;
    @NotNull
    private Integer gender;
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date birth;
    private String realName;
    private Integer certified;
    @EncryptTransaction
    private String idNumber;
    private String signature;
    private String introduction;
    private Integer regionId;
    private String address;
    private String avaterUrl;
}
